package com.repair.user.pojo.convertor;

import com.repair.api.user.response.data.UserInfo;
import com.repair.user.pojo.entity.User;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;

/**
 * @author chunyu
 * @since 2024/11/5,20:39
 */
@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface UserConvertor {

    UserConvertor INSTANCE = org.mapstruct.factory.Mappers.getMapper(UserConvertor.class);

    /**
     * user 转换为 UserInfo
     * @param user user
     * @return
     */
    UserInfo mapToVo(User user);
}
